package cn.sinobest.pid.common;

import java.text.SimpleDateFormat;


public class AppConstant {
	
	public static final String JDBC_SERVICE_BEAN_NAME = "jdbcService";
	
	/**
	 * 应用的配置文件
	 */
	public static final String APP_CONF_FILE_NAME = "sjjhpt.properties";
	
	/**
	 * 当前用户id参数名
	 */
	public static final String CURR_USER_ID = "userId";
	
	/**
	 * 资源库root用户名
	 */
	public static final String REPOSITORY_ROOT_NAME = "admin";

	/**
	 * 当前用户的资源库id参数名
	 */
	public static final String CURR_USER_KETTLE_ID = "userKettleId";

	/**
	 * 日期处理格式
	 */
	public static final SimpleDateFormat TIME_FORMAT = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
	
	/**
	 * 精简日期处理格式
	 */
	public static final SimpleDateFormat COMPACK_TIME_FORMAT = new SimpleDateFormat("yyyyMMddHHmmss");
	
	/**
	 * 接口报文根目录
	 */
	public static final String INTER_REPONSE_XML_ROOT = "response";
	
	//---------------job执行状态----------
	//作业已配置
	public static final int JOB_CONFIG = -2;
	//作业调度已配置
	public static final int JOB_SCHEDULED = -1;
	//作业已启动，调度中
	public static final int JOB_INSCHED = 0;
	//作业已排队
	public static final int JOB_INQUEUE = 1;
	//作业正在运行
	public static final int JOB_RUNNING = 2;
	//作业已完成(当前状态代表作业执行完，上次状态则代表作业执行成功)
	public static final int JOB_FINISHED = 3;
	//作业发生错误
	public static final int JOB_FAILED = 4;
	//作业终止中
	public static final int JOB_ABORTING = 5;
	//作业已终止
	public static final int JOB_ABORTED = 6;
	//作业不存在
	public static final int JOB_NOT_EXIST = 7;
	//作业已存在
	public static final int JOB_EXIST = 8;

	//作业状态描述
	public static final String[] JOB_STATUS_DESC= {};
	
	//Kettle中的类型
	public static final int KETTLE_TRANS = 1;
	public static final int KETTLE_JOB = 2;
	
	//--------------操作处理结果---------
	//处理成功
	public static final int DEAL_SUCC = 0;
	//处理全部失败
	public static final int ALL_FAILED = 99;
	//网络异常失败
	public static final int NET_FAILED = -1;
	//系统错误
	public static final int SYSTEM_ERROR = -99;
	//空
	public static final int NULL_CONTENT = -5;
	//个数超限
	public static final int OUT_CAPACITY = -6;
	//处理部分成功
	public static final int PART_SUCC = 1;
	//XML格式异常
	public static final int XML_FORMAT_ERROR = -4;
	//文件读取异常
	public static final int FILE_READ_FAILED = -5;
	//参数不匹配
	public static final int PARAM_NOT_MATCHED = -7;
	//作业模板名不存在
	public static final int MODEL_NAME_NOT_EXIST = -8;
	
	//---------------checkNo验证----------
	//长度错误
	public static final int LENGTH_INVALID = -1;
	//认证身份有误（用户名或密码)
	public static final int AUTH_INVALID = -2;
	//认证过期失效
	public static final int AUTH_EXPIRED = -4;
	//认证码格式有误
	public static final int FORMAT_INVALID = -3;
	//系统时间错误
	public static final int TIME_ERROR = -9;
	
	//处理结果名
	public static final String RTN_CODE_STR = "rtn_code";
	public static final String RTN_MSG_STR = "rtn_msg";
	
}